package com.qidian.server;

/**
 * 返回状态
 * 
 * */
public enum Status 
{
	FREEZE(-23,"主账号或子账号被冻结"),
	TIME_OUT_MSG(-22,"超时未回答"),
	DUPLICATE_FILE(-21,"重复图片"),
	UNKNOWN_FILE(-20,"无法识别的文件"),
	OTHER_ERROR(-19,"其他异常"),
	CLIENT_LOGIN_ALREADY(-18,"客户端已登陆"),
	CALL_TOO_MANY(-17,"调用次数过多|频率过高"),
	NEED_MORE_POINT_MAIN(-16,"开发者账号点数不足"),
	LOGIN_FIRST(-15,"请先登录"),
	TIME_OUT(-14,"过期的账号或者充值卡"),
	INVALID_VALIDATE_CODE(-13,"验证码错误"),
	USER_EXISTS(-12,"用户或子账号已存在"),
	USED_RECHARGE_CARD(-11,"充值卡号已使用"),
	INVALID_CODE(-10,"无效的账号或者充值卡号"),
	NEED_MORE_POINT(-9,"子账号剩余点数不足") ,
	FILE_UPLOAD_FAILURE(-8,"发送文件失败"),
	INVALID_ARGUMENT(-7,"参数缺失或无效的参数值,如手机账号为1A3567"),
	INVALID_USERNAME_OR_PASSWORD(-6,"无效的用户名或密码"),
	SERVER_TOO_BUSY(-5,"服务器繁忙"),
	USER_ID_MISMATCH(-4,"请使用同一开发者生成的充值卡或子账号"),
	INVALID_VALUE(-3,"参数值异常,如无效的项目类型、废弃账号、被冻结用户等"),
	NOT_READY(-2,"答案未准备好"),
	NETWORK_ERROR(-1,"网络异常"),
	OK(0,"成功");
	
	public Integer statusCode ;
	public String description ;
	private Status(int statusCode,String description)
	{
		this.statusCode = statusCode ;
		this.description = description ;
	}
	public String getDescription()
	{
		return this.description ;
	}
	public int getStatusCode()
	{
		return statusCode ;
	}
	public String toString()
	{
		return statusCode.toString() ;
	}
	public boolean isOK()
	{
		return statusCode == Status.OK.statusCode ;
	}
}
